package com.spring.core.io;


import com.spring.util.ClassUtils;

/**
 * @author liyuncong
 * @version 1.0
 * @file DefaultResourceLoader
 * @brief DefaultResourceLoader
 * @details DefaultResourceLoader
 * @date 2023-01-12
 *
 * Edit History
 * ----------------------------------------------------------------------------
 * DATE                        NAME               DESCRIPTION
 * 2023-01-12                  liyuncong          Created
 */
public class DefaultResourceLoader implements ResourceLoader {

    private ClassLoader classLoader;

    public DefaultResourceLoader(ClassLoader classLoader) {
        this.classLoader = classLoader;
    }

    public void setClassLoader(ClassLoader classLoader) {
        this.classLoader = classLoader;
    }

    public ClassLoader getClassLoader() {
        return this.classLoader != null ? this.classLoader : ClassUtils.getDefaultClassLoader();
    }

    @Override
    public Resource getResource(String location) {
        return null;
    }
}
